﻿using ALang.AST;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XLang;

namespace ALang.Test
{
    class Program
    {
        static void Main(string[] args)
        {
            var src = @"module myApp{

}";

            var parser = new Parser(typeof(Import).Assembly);

            var lexer = parser.Lexer;
            var lcontext = new LContext();
            lcontext.Load(src);
            lcontext.GetChar();

            Token token = lexer.ReadToken(lcontext);
            while (token != null)
            {
                Console.WriteLine(token.GetType().Name+":"+token.Text);
                token = lexer.ReadToken(lcontext);
            }
            Console.ReadLine();
        }
    }
}
